{if IS_USE_MODULE}
<div class="portlet portlet-sortable light bordered">
    <div class="portlet-title tabbable-line">
        <div class="caption">
            <i class="fa fa-bar-chart"></i>
            <span class="caption-subject"> {dr_lang('财务统计')} </span>
        </div>
    </div>
    <div class="portlet-body" style="height: 120px;">
        {sum sum=value action=table table=member_paylog status=1 return=zonghes} 
        {php $data = XR_M()->dbprefix();}
        
        {php $biao=$data.'member_paylog';}
        <?php $query=urlencode('select * from @#member_paylog where value < 0');?>
        {sum sum=value action=sql sql='select * from $biao WHERE value < 0' return=zonghe} 
        {sum sum=value action=sql sql='select * from $biao WHERE value < 0 AND DATEDIFF(from_unixtime(paytime),now())=0' return=zonghejintian} 
        {sum sum=value action=sql sql='select * from $biao WHERE value < 0 AND DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(from_unixtime(paytime))' return=zonghebenyue} 
        
        {sum sum=value action=sql sql='select * from $biao WHERE value < 0 AND DATE_SUB(CURDATE(), INTERVAL 90 DAY) <= date(from_unixtime(paytime))' return=zonghejiushi} 
        
        
        
        {count action=sql sql='select * from $biao WHERE value < 0' return=jiaoyishu}
        
        
        

        <div class="table-scrollable">
            <table class="table table-mtotal table-nomargin table-bordered table-striped table-bordered table-advance">
                <thead>
                <tr>
                    
                    <th style="text-align: center">{dr_lang('总数据')}</th>
                    <th style="text-align: center">{dr_lang('交易数')}</th>
                    <th style="text-align: center">{dr_lang('今日收入')}</th>
                    <th style="text-align: center">{dr_lang('本月收入')}</th>
                    <th style="text-align: center">{dr_lang('90天收入')}</th>
                   
                    <th>{dr_lang('操作')}</th>
                </tr>
                </thead>
                <tbody>
                
                <tr>
                    

                    <td style="text-align: center"><a class="drlabel drlabel-success" href="{dr_url('pay/paylog/index')}">{abs($zonghe_sum)}<br>元 </a></td>
                    <td style="text-align: center">{$jiaoyishu_count} <br>条</td>
                    <td style="text-align: center"><a class="drlabel drlabel-success" href="{dr_url('pay/paylog/index')}">{abs($zonghejintian_sum)}<br>元</a></td>
                    <td style="text-align: center"><a class="drlabel drlabel-success" href="{dr_url('pay/paylog/index')}">{abs($zonghebenyue_sum)}<br>元</a></td>
                    <td style="text-align: center"><a class="drlabel drlabel-success" href="{dr_url('pay/paylog/index')}">{abs($zonghejiushi_sum)}<br>元</a></td>
                    
                    <td>
                        <a class="btn btn-xs dark" href="{dr_url('pay/paylog/index')}" >{dr_lang('管理')}</a>
                        
                    </td>
                </tr>
                
                
                
                </tbody>
            </table>

        </div>
    </div>
</div>
{/if}